package com.dxl;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@PropertySource(value = "classpath:dog.properties")
@Component //注册bean
public class Dog {
    @Value("${name}")
    private String name;
    @Value("18")
    private Integer age;

}
